/*
 * GoogleStrategy.java
 */

package pl.edu.pw.mini.adapter;

import pl.edu.pw.mini.gui.GoogleInterfaceLogic;
import pl.edu.pw.mini.gui.IInterfaceLogic;
import pl.edu.pw.mini.state.StateManager;
import pl.edu.pw.mini.test.GoogleTest;
import pl.edu.pw.mini.user.UserData;
import pl.edu.pw.mini.user.UserDataManager;

/**
 *
 * @author cdendek
 */
public class GoogleStrategy implements IAdapterStrategy{

    private static GoogleStrategy gStrategy = new GoogleStrategy();
    
    protected GoogleStrategy(){
        
    }
    
    public IAdapter getAdapter() {
        return GoogleAdapter.getAdapter();
    }
    
    public IConnectionState  getConnectionState(){
        return StateManager.getGoogle();
    }
    
    public void setConnectionState(IConnectionState state){
        StateManager.storeGoogle((GoogleAdapter.GoogleConnectionState)state);
    }
    
    public String getSampleLogin(){
        return GoogleTest.testLogin;
    }
    
    public String getSamplePassword(){
        return GoogleTest.testPassword;
    }

    public IInterfaceLogic getInterfaceLogic() {
        return GoogleInterfaceLogic.getInstance();
    }

    public String getServiceId() {
        return "Google";
    }

    public static GoogleStrategy getInstance() {
        return gStrategy;
    }
    
    public UserData getUserData(){
        return UserDataManager.getGoogleUserData();
    }
    
    public void setUserData(UserData userData){
        UserDataManager.setGoogleUserData(userData);
    }
    
}
